<?php
namespace Admin\Model;
use Think\Model;
use Think\Model\RelationModel;
class UserModel extends RelationModel{
    //自动验证
    protected $_validate = array(
        array('username', 'require', '请填写用户名'),
        array('email', 'require', '请填写email'),
    );
}